import request from "@/utils/request";
// 获取列表接口
export function getuserInfoAPI(params) {
  return request({
    url: "/data",
    method: "GET",
    params: params,
  });
}
// 删除
export function deluserInfoAPI(id) {
  return request({
    url: `/data/${id}`,
    method: "DELETE",
  });
}
// 搜索
export function searchuserInfoAPI(val) {
  return request({
    url: `/data/?name=${val}`,
    method: "GET",
  });
}
// 新增
export function adduserInfoAPI(data) {
  return request({
    url: "/data",
    method: "POST",
    data: data,
  });
}
// 编辑
export function edituserInfoAPI(data) {
  return request({
    url: `/data/${data.id}`,
    method: "PUT",
    data: data,
  });
}
// 详情(用于数据回调)
export function getuserInfoDetailAPI(id) {
  return request({
    url: `/data/${id}`,
    method: "GET",
  });
}
